// 养老设施服务
const serviceFacModel = (request) => {
	return {
		// 通过id查询基础数据
		dpServiceFacility_info(id) {
			return request(`/bussiness/dpServiceFacility/${id}`, {
				method: 'get',
			})
		},
		view_dpServiceFacility_view(id) {
			return request(`/bussiness/dpServiceFacility/${id}`, {
				method: 'get',
			})
		},
		// 新增
		dpServiceFacility_add(query = {}) {
			return request('/bussiness/dpServiceFacility/add', {
				method: 'post',
				data: query,
			})
		},
		//   删除
		dpServiceFacility_del(ids) {
			return request('/bussiness/dpServiceFacility/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
		//  编辑
		dpServiceFacility_edit(query = {}) {
			return request('/bussiness/dpServiceFacility/edit', {
				method: 'post',
				data: query,
			})
		},
		//  养老服务设施基础数据下载模板
		dpServiceFacility_download(query = {}) {
			return request('/bussiness/dpServiceFacility/downloadTemplate', {
				method: 'post',
				data: query,
			})
		},
		//  通过id查询养老服务设施基础数据
		dpServiceFacility_search(id) {
			return request(`/bussiness/dpServiceFacility/${id}`, {
				method: 'get',
			})
		},
		//  分页查询养老服务设施基础数据
		dpServiceFacility_page(query = {}) {
			return request(`/bussiness/dpServiceFacility/page`, {
				method: 'post',
				data: query,
			})
		},
		// 导出养老服务设施基础数据
		dpServiceFacility_export(query = {}) {
			return request(`/bussiness/dpServiceFacility/export`, {
				method: 'post',
				data: query,
			})
		},
		//  搜集单个养老服务设施基础数据
		dpServiceFacility_gather(query = {}) {
			return request(`/bussiness/dpServiceFacility/gather`, {
				method: 'post',
				data: query,
			})
		},
		// 单个养老设施拓展数据
		dpServiceFacilityExtend_gather(query = {}) {
			return request(`/bussiness/dpServiceFacilityExtend/gather`, {
				method: 'post',
				data: query,
			})
		},
		// 单个养老设施其他数据
		//
		dpServiceFacilityOther_gatherAll(query = {}) {
			return request(`/bussiness/dpServiceFacilityOther/gatherAll`, {
				method: 'post',
				data: query,
			})
		},
		//  基础表导入
		dpServiceFacility_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpServiceFacility/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		//  拓展表导入
		dpServiceFacilityExtend_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpServiceFacilityExtend/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 其他表导入
		dpServiceFacilityOther_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpServiceFacilityOther/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 老年用品导入
		dpServiceOrgProduct_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpSenileProducts/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 设施设备导入
		dpServiceOrgDevice_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpFacilityEquipment/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 运营记录模板导入
		dpOperateRecord_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpOperateRecord/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},

		// 基础下载模板
		dpServiceFacility_downloadTemplate(query = {}) {
			return request(`/bussiness/dpServiceFacility/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 拓展下载模板
		dpServiceFacilityExtend_downloadTemplate(query = {}) {
			return request(`/bussiness/dpServiceFacilityExtend/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 其他下载模板
		dpServiceFacilityOther_downloadTemplate(query = {}) {
			return request(`/bussiness/dpServiceFacilityOther/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 老年用品下载
		dpServiceOrgProduct_downloadTemplate(query = {}) {
			return request(`/bussiness/dpSenileProducts/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 设施设备下载
		dpServiceOrgDevice_downloadTemplate(query = {}) {
			return request(`/bussiness/dpFacilityEquipment/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 运营记录模板下载
		dpOperateRecord_downloadTemplate(query = {}) {
			return request(`/bussiness/dpOperateRecord/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},

		// 通过设备名称查询所有基础信息，拓展信息，其他信息
		dpServiceFacility_details(hId) {
			return request(`/bussiness/dpServiceFacility/details/${hId}`, {
				method: 'get',
			})
		},
		// 养老机构等级评定
		// /dpOrgLevelEvaluate/page
		dpOrgLevelEvaluate_page(query = {}) {
			return request(`/bussiness/dpOrgLevelEvaluate/page`, {
				method: 'post',
				data: query,
			})
		},
		// 按需导出
		dpServiceFacility_exportAll(query = {}) {
			return request(`/bussiness/dpServiceFacility/exportAll`, {
				method: 'post',
				data: query,
			})
		},
		//  分页查询养老从业人员数据
		dpFoundationPractitioners_page(query = {}) {
			return request('/bussiness/dpFoundationPractitioners/page', {
				method: 'post',
				data: query,
			})
		},
		// 根据统一社会信用代码拿到从业人员统计
		dpFoundationPractitioners_statistics(creditCode) {
			return request(`/bussiness/dpFoundationPractitioners/statistics/${creditCode}`, {
				method: 'get',
			})
		},
		// 运营记录添加
		view_dpOperateRecord_add(query = {}) {
			return request('/bussiness/dpOperateRecord/add', {
				method: 'post',
				data: query,
			})
		},
		// 聚合搜索
		view_dpServiceFacility_search(query = {}) {
			return request('/bussiness/dpServiceFacility/search', {
				method: 'post',
				data: query,
			})
		},
		// 全字段查询
		view_dpServiceFacility_search_page(query = {}) {
			return request('/bussiness/dpServiceFacility/search/page', {
				method: 'post',
				data: query,
			})
		},

		// 民生实事养老服务设施基础数据信息导入
		view_classifyDpServiceFacility_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpServiceFacility/classify/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},

		// 民生实事养老服务设施基础数据下载模板
		view_classifyDpServiceFacility_downloadTemplate(query = {}) {
			return request(`/bussiness/dpServiceFacility/classify/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
	}
}
export default ({ request }: any) => ({
	...serviceFacModel(request),
})
